package cn.clq.ymcc.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

/**
 * @description: 发送短信验证码过程中需要用到的字面量
 * @param: null
 * @return:
 * @author clqlongbao
 * @date: 2022/7/15 19:51
 */
@Data
@Component
//自动从配置读取，按照前缀过滤出配置项，同名匹配给对象的属性
@ConfigurationProperties(prefix = "ymcc.smsverifycode")
@RefreshScope//热更新nacos中yml的配置
public class SMSVerifyCodeProperties {

    //发送间隔
    private int interval;
    //验证码长度
    private int length;
    //过期时间
    private int expire;
}